package com.edu.admin.mapper;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.edu.admin.common.BaseMapper;
import com.edu.admin.entity.SysGrade;
import com.edu.admin.vo.GradeVo;


/**
 * 年级表数据操作接口
 * 
 * @author Wangjiong
 * 
 */
@Mapper
public interface GradeMapper extends BaseMapper<SysGrade> {

	/**
	 * 获取年级列表
	 * 
	 * @param Long phaseId
	 * 
	 * @return List<GradeVo>
	 */
	List<GradeVo> getGradeList(@Param("phaseId") Long phaseId);
	
		
	/**
	 * 获取年级信息
	 * 
	 * @param Long gradeId
	 * 
	 * @return GradeVo
	 */
	GradeVo getGradeByGradeId(@Param("gradeId") Long gradeId);
	
	/**
	 * 获取年级信息
	 * 
	 * @param phaseId
	 * @param yearNum
	 * 
	 * @return GradeVo
	 * 
	 */
	GradeVo getGradeByPhaseIdAndYearNum(@Param("phaseId") Long phaseId,
									  @Param("yearNum") Integer yearNum);
	
	/**
	 * 年级查重
	 * 
	 * @param phaseId
	 * @param gradeId
	 * @param gradeName
	 * 
	 * @return List<GradeVo>
	 */
	List<GradeVo> findGradeByGradeName(@Param("phaseId") Long phaseId,
										@Param("gradeId") Long gradeId,
										@Param("gradeName") String gradeName);


}
